#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""启动Hash Storage GUI的便捷脚本"""

import sys
import os
from pathlib import Path

# 添加当前目录到Python路径
current_dir = Path(__file__).parent
sys.path.insert(0, str(current_dir))

try:
    from gui import main
    
    if __name__ == "__main__":
        print("启动Hash Storage GUI...")
        print("请确保已配置.env文件中的MinIO连接信息")
        print("按Ctrl+C退出")
        print("-" * 50)
        main()
        
except ImportError as e:
    print(f"导入错误: {e}")
    print("请确保已安装所有依赖:")
    print("pip install -r requirements.txt")
    sys.exit(1)
except Exception as e:
    print(f"启动错误: {e}")
    sys.exit(1)